Example Program
Smith-Waterman Algorithm
Smith-Waterman local alignment code example.
File "graph_align_sw.cpp"
This code example illustrates a graph-based Smith-Waterman alignment
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 |
Alignments are carried out on a StringSet that holds the sequences
10 | |
11 | |
12 |
Configuration of alignment algorithm: Scoring (Match = 2, Mismatch = -1, Gap-extension = -1, Gap-opening = -2)
13 |
We could again use a graph to retrieve the local alignment, but as with all other alignment algorithms we can also use a string of fragments or simply std::cout.
14 | |
15 | |
16 |
Local alignment with Smith-Waterman
17 |
Console output
18 | |
19 | |
20 | |
21 | |
22 | |
23 | |
24 | |
25 | |
26 | |
27 |
See
SeqAn - Sequence Analysis Library - www.seqan.de